@@ -286,19 +286,16 @@ static void default_setup(ezgl::application* app) {
286
286
search_setup (app);
287
287
}
288
288
289
+ // Initial Setup functions run default setup if they are a new window. Then, they will run
290
+ // the specific hiding/showing functions that separate them from the other init. setup functions
291
+
289
292
/* function below intializes the interface window with a set of buttons and links
290
293
* signals to corresponding functions for situation where the window is opened from
291
294
* NO_PICTURE_to_PLACEMENT */
292
295
static void initial_setup_NO_PICTURE_to_PLACEMENT (ezgl::application* app,
293
296
bool is_new_window) {
294
- if (!is_new_window)
295
- return ;
296
-
297
- // Configuring visible buttons
298
- default_setup (app);
299
-
300
- // THIS WILL BE CHANGED SOON IGNORE
301
- load_block_names (app);
297
+ if (is_new_window)
298
+ default_setup (app);
302
299
303
300
// Hiding unused functionality
304
301
hide_widget (" RoutingMenuButton" , app);
@@ -311,9 +308,10 @@ static void initial_setup_NO_PICTURE_to_PLACEMENT(ezgl::application* app,
311
308
static void initial_setup_NO_PICTURE_to_PLACEMENT_with_crit_path (
312
309
ezgl::application* app,
313
310
bool is_new_window) {
314
- if (!is_new_window)
315
- return ;
316
- default_setup (app);
311
+ if (is_new_window)
312
+ default_setup (app);
313
+
314
+ // Showing given functionality
317
315
crit_path_button_setup (app);
318
316
319
317
// Hiding unused routing menu
@@ -325,11 +323,10 @@ static void initial_setup_NO_PICTURE_to_PLACEMENT_with_crit_path(
325
323
* PLACEMENT_to_ROUTING */
326
324
static void initial_setup_PLACEMENT_to_ROUTING (ezgl::application* app,
327
325
bool is_new_window) {
328
- if (!is_new_window)
329
- return ;
330
- default_setup (app);
331
- routing_button_setup (app);
326
+ if (is_new_window)
327
+ default_setup (app);
332
328
329
+ routing_button_setup (app);
333
330
hide_crit_path_button (app);
334
331
}
335
332
@@ -338,9 +335,8 @@ static void initial_setup_PLACEMENT_to_ROUTING(ezgl::application* app,
338
335
* ROUTING_to_PLACEMENT */
339
336
static void initial_setup_ROUTING_to_PLACEMENT (ezgl::application* app,
340
337
bool is_new_window) {
341
- if (!is_new_window)
342
- return ;
343
- default_setup (app);
338
+ if (is_new_window)
339
+ default_setup (app);
344
340
345
341
// Hiding unused functionality
346
342
hide_widget (" RoutingMenuButton" , app);
@@ -352,9 +348,9 @@ static void initial_setup_ROUTING_to_PLACEMENT(ezgl::application* app,
352
348
* NO_PICTURE_to_ROUTING */
353
349
static void initial_setup_NO_PICTURE_to_ROUTING (ezgl::application* app,
354
350
bool is_new_window) {
355
- if (! is_new_window)
356
- return ;
357
- default_setup (app);
351
+ if (is_new_window)
352
+ default_setup (app) ;
353
+
358
354
routing_button_setup (app);
359
355
hide_crit_path_button (app);
360
356
}
@@ -365,9 +361,9 @@ static void initial_setup_NO_PICTURE_to_ROUTING(ezgl::application* app,
365
361
static void initial_setup_NO_PICTURE_to_ROUTING_with_crit_path (
366
362
ezgl::application* app,
367
363
bool is_new_window) {
368
- if (! is_new_window)
369
- return ;
370
- default_setup (app);
364
+ if (is_new_window)
365
+ default_setup (app) ;
366
+
371
367
routing_button_setup (app);
372
368
crit_path_button_setup (app);
373
369
}
@@ -379,7 +375,6 @@ void update_screen(ScreenUpdatePriority priority, const char* msg, enum pic_type
379
375
/* Updates the screen if the user has requested graphics. The priority *
380
376
* value controls whether or not the Proceed button must be clicked to *
381
377
* continue. Saves the pic_on_screen_val to allow pan and zoom redraws. */
382
-
383
378
t_draw_state* draw_state = get_draw_state_vars ();
384
379
385
380
if (!draw_state->show_graphics )
0 commit comments