Browse Source

Mixer: Avoid some unnecessary redraws when opening project.

tags/non-daw-v1.3.0
Jonathan Moore Liles 3 years ago
parent
commit
655ccf94c3
2 changed files with 16 additions and 2 deletions
  1. +15
    -1
      mixer/src/JACK_Module.C
  2. +1
    -1
      mixer/src/Mixer.C

+ 15
- 1
mixer/src/JACK_Module.C View File

@@ -49,6 +49,8 @@ extern char *instance_name;
#include "Mixer.H"
#include "Group.H"

#include "Project.H"

static JACK_Module *receptive_to_drop = NULL;

@@ -299,12 +301,23 @@ JACK_Module::update_connection_status ( void )
return;
}

/* causes a lot of unnecessary redraws to do this when loading */
if ( Project::is_opening() )
return;

/* FIXME: only do something if port list actually changed! */
std::list<std::string> output_names = get_connections_for_ports( aux_audio_output );
std::list<std::string> input_names = get_connections_for_ports( aux_audio_input );

if ( (unsigned int)connection_display->size() == input_names.size() + output_names.size() )
/* looks like nothing was added or removed, bail.
FIXME: this would be better if it actually compared the lists item by item. */
return;
connection_display->clear();

int n = 0;

for ( std::list<std::string>::const_iterator j = input_names.begin();
j != input_names.end();
j++ )
@@ -329,7 +342,8 @@ JACK_Module::update_connection_status ( void )
else
size( w(), 24 );
parent()->parent()->redraw();
/* parent()->parent()->redraw(); */
parent()->redraw();
}

void


+ 1
- 1
mixer/src/Mixer.C View File

@@ -763,7 +763,7 @@ void Mixer::add ( Mixer_Strip *ms )
mixer_strips->add( ms );

ms->size( ms->w(), _strip_height );
ms->redraw();
/* ms->redraw(); */
ms->take_focus();

renumber_strips();


Loading…
Cancel
Save