src/gui_actions.cpp

changeset 414
0f40c56fde23
parent 409
8da2563c645a
child 415
6598e3f9c673
equal deleted inserted replaced
413:a52c30a4c041 414:0f40c56fde23
329 g_win->sel().clear(); 329 g_win->sel().clear();
330 330
331 for (LDObject* obj : objs) { 331 for (LDObject* obj : objs) {
332 LDFile::current()->insertObj (idx, obj); 332 LDFile::current()->insertObj (idx, obj);
333 g_win->sel() << obj; 333 g_win->sel() << obj;
334 g_win->R()->compileObject( obj );
334 335
335 idx++; 336 idx++;
336 } 337 }
337 338
338 g_win->fullRefresh(); 339 g_win->refresh();
339 g_win->scrollToSelection(); 340 g_win->scrollToSelection();
340 } 341 }
341 342
342 // ============================================================================= 343 // =============================================================================
343 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 344 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
390 for (str line : str (te_edit->toPlainText()).split ("\n")) { 391 for (str line : str (te_edit->toPlainText()).split ("\n")) {
391 LDObject* obj = parseLine (line); 392 LDObject* obj = parseLine (line);
392 393
393 LDFile::current()->insertObj (idx, obj); 394 LDFile::current()->insertObj (idx, obj);
394 g_win->sel() << obj; 395 g_win->sel() << obj;
396 g_win->R()->compileObject( obj );
395 idx++; 397 idx++;
396 } 398 }
397 399
398 g_win->fullRefresh(); 400 g_win->refresh();
399 g_win->scrollToSelection(); 401 g_win->scrollToSelection();
400 } 402 }
401 403
402 DEFINE_ACTION (Screenshot, 0) { 404 DEFINE_ACTION (Screenshot, 0) {
403 setlocale (LC_ALL, "C"); 405 setlocale (LC_ALL, "C");
431 // ============================================================================= 433 // =============================================================================
432 DEFINE_ACTION (Visibility, 0) { 434 DEFINE_ACTION (Visibility, 0) {
433 for (LDObject* obj : g_win->sel()) 435 for (LDObject* obj : g_win->sel())
434 obj->setHidden (!obj->hidden()); 436 obj->setHidden (!obj->hidden());
435 437
436 g_win->fullRefresh(); 438 g_win->refresh();
437 } 439 }
438 440
439 DEFINE_ACTION (Wireframe, 0) { 441 DEFINE_ACTION (Wireframe, 0) {
440 gl_wireframe = !gl_wireframe; 442 gl_wireframe = !gl_wireframe;
441 g_win->R()->refresh(); 443 g_win->R()->refresh();

mercurial