Set song dirtiness more often/more consistently.
This commit is contained in:
parent
93f51f33ea
commit
cb5960d298
3
TODO
3
TODO
|
@ -6,9 +6,6 @@
|
|||
; General
|
||||
|
||||
* allow deletion and renumbering of individual patterns and phrases.
|
||||
* dirty the song more often than just on note manipulation. Pattern
|
||||
names, playlist chances, viewport size adjustments--all need to
|
||||
dirty the song.
|
||||
* add mode for disconnected operation. This is especially important
|
||||
for the situation where there is a timebase master when Non is
|
||||
started that exits before Non is closed, resulting in a lack of BBT
|
||||
|
|
9
canvas.C
9
canvas.C
|
@ -85,7 +85,7 @@ void
|
|||
Canvas::handle_event_change ( void )
|
||||
{
|
||||
/* mark the song as dirty and pass the signal on */
|
||||
song.dirty( true );
|
||||
song.set_dirty();
|
||||
|
||||
signal_draw();
|
||||
}
|
||||
|
@ -914,6 +914,8 @@ Canvas::h_zoom ( float n )
|
|||
m.vp->w = max( 32, min( (int)(m.vp->w * n), 256 ) );
|
||||
|
||||
resize_grid();
|
||||
|
||||
song.set_dirty();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -928,6 +930,9 @@ Canvas::v_zoom_fit ( void )
|
|||
m.vp->y = 0;
|
||||
|
||||
resize_grid();
|
||||
|
||||
song.set_dirty();
|
||||
|
||||
}
|
||||
|
||||
/** adjust vertical zoom (* n) */
|
||||
|
@ -937,6 +942,8 @@ Canvas::v_zoom ( float n )
|
|||
m.vp->h = max( 1, min( (int)(m.vp->h * n), m.maxh ) );
|
||||
|
||||
resize_grid();
|
||||
|
||||
song.set_dirty();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
6
grid.C
6
grid.C
|
@ -784,6 +784,8 @@ Grid::resolution ( unsigned int n )
|
|||
DEBUG( "%d setting resolution to %d", n, _ppqn );
|
||||
|
||||
signal_events_change();
|
||||
|
||||
signal_settings_change();
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -804,6 +806,8 @@ Grid::name ( char *s )
|
|||
if ( _name ) free ( _name );
|
||||
|
||||
_name = s;
|
||||
|
||||
signal_settings_change();
|
||||
}
|
||||
|
||||
const char *
|
||||
|
@ -818,6 +822,8 @@ Grid::notes ( char *s )
|
|||
if ( _notes ) free ( _notes );
|
||||
|
||||
_notes = s;
|
||||
|
||||
signal_settings_change();
|
||||
}
|
||||
|
||||
char *
|
||||
|
|
|
@ -1008,7 +1008,7 @@ You should have received a copy of the GNU General Public License along with thi
|
|||
system( "x-www-browser http://non.tuxfamily.org &" );
|
||||
\#else
|
||||
fl_open_uri( "http://non.tuxfamily.org" );
|
||||
\#endif} selected
|
||||
\#endif}
|
||||
xywh {178 554 188 30} color 14 labeltype SHADOW_LABEL labelcolor 6
|
||||
}
|
||||
Fl_Return_Button {} {
|
||||
|
@ -1472,7 +1472,9 @@ _c->resize( x(), y(), w(), h() );
|
|||
_c->signal_draw.connect( sigc::mem_fun( this, &O_Canvas::draw_notes ) );
|
||||
_c->signal_resize.connect( sigc::mem_fun( this, &O_Canvas::clear ) );
|
||||
|
||||
_c->signal_settings_change.connect( sigc::ptr_fun( &UI::update_canvas_widgets ) );} {}
|
||||
_c->signal_settings_change.connect( sigc::ptr_fun( &UI::update_canvas_widgets ) );
|
||||
_c->signal_settings_change.connect( sigc::mem_fun( song, &song_settings::set_dirty ) );} {selected
|
||||
}
|
||||
}
|
||||
Function {click_to_focus()} {open return_type bool
|
||||
} {
|
||||
|
@ -1645,7 +1647,7 @@ return r;} {}
|
|||
}
|
||||
|
||||
widget_class Triggers {open
|
||||
xywh {429 76 1278 1003} type Double resizable
|
||||
xywh {397 42 1278 1003} type Double resizable
|
||||
code0 {populate();}
|
||||
code1 {\#include <Fl/Fl_Dial.H>}
|
||||
class Fl_Group visible
|
||||
|
|
6
main.C
6
main.C
|
@ -113,6 +113,8 @@ load_song ( const char *name )
|
|||
|
||||
song.filename = strdup( name );
|
||||
|
||||
song.dirty( false );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -151,6 +153,8 @@ main ( int argc, char **argv )
|
|||
init_song();
|
||||
|
||||
pattern::signal_create_destroy.connect( mem_fun( phrase_c, &Canvas::v_zoom_fit ) );
|
||||
pattern::signal_create_destroy.connect( mem_fun( song, &song_settings::set_dirty ) );
|
||||
phrase::signal_create_destroy.connect( mem_fun( song, &song_settings::set_dirty ) );
|
||||
|
||||
if ( ! lash.init( &argc, &argv ) )
|
||||
WARNING( "error initializing LASH" );
|
||||
|
@ -170,6 +174,8 @@ main ( int argc, char **argv )
|
|||
else
|
||||
ASSERTION( "Either the version of JACK you are using does pass BBT information, or the current timebase master does not provide it." );
|
||||
|
||||
song.dirty( false );
|
||||
|
||||
MESSAGE( "Initializing GUI" );
|
||||
|
||||
init_colors();
|
||||
|
|
12
non.H
12
non.H
|
@ -104,11 +104,23 @@ struct song_settings
|
|||
_dirty = b;
|
||||
|
||||
if ( b )
|
||||
{
|
||||
MESSAGE( "song is now dirty" );
|
||||
signal_dirty();
|
||||
}
|
||||
else
|
||||
{
|
||||
MESSAGE( "song is now clean" );
|
||||
signal_clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
set_dirty ( void )
|
||||
{
|
||||
dirty( true );
|
||||
}
|
||||
|
||||
struct {
|
||||
int feel;
|
||||
|
|
|
@ -71,6 +71,8 @@ sequence::unlock ( void )
|
|||
_rd = _rw;
|
||||
|
||||
_rw = NULL;
|
||||
|
||||
song.set_dirty();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -426,6 +428,8 @@ sequence::name ( const char *s )
|
|||
if ( _name ) free( _name );
|
||||
|
||||
_name = strdup( s );
|
||||
|
||||
song.set_dirty();
|
||||
}
|
||||
|
||||
char *
|
||||
|
@ -440,4 +444,6 @@ sequence::notes ( const char *s )
|
|||
if ( _notes ) free( _notes );
|
||||
|
||||
_notes = strdup( s );
|
||||
|
||||
song.set_dirty();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue