~gimaker/peekabot/coord-sys-default

« back to all changes in this revision

Viewing changes to src/gui/UserInterfaceUtilities.cc

  • Committer: Staffan Gimåker
  • Date: 2009-06-29 10:09:26 UTC
  • mfrom: (665.1.39 renderer-redux)
  • Revision ID: staffan@gimaker.se-20090629100926-ju5kx8jwzy422rwu
Merged the renderer-redux branch.

This represents a major overhaul to the rendering engine, with a less contrived
design and better performance. Both memory and CPU utilization should be 
better in general.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "UserInterfaceUtilities.hh"
24
24
#include "UpdateActions.hh"
25
25
#include "UserInterface.hh"
26
 
#include "../renderer/Renderer.hh"
27
26
#include "PropertyFrame.hh"
28
27
#include "ViewFrame.hh"
29
28
#include "Viewport.hh"
33
32
#include "../Action.hh"
34
33
#include "../atl/ActionRouter.hh"
35
34
#include "../PrintfFormatter.hh"
36
 
#include "../IDTranslationTable.hh"
37
35
#include "Manipulator.hh"
38
36
#include "CommandRepository.hh"
39
37
#include "../Configuration.hh"
40
38
#include "../actions/RemoveObject.hh"
41
39
#include "../SceneObject.hh"
 
40
#include "../actions/SetSelected.hh"
42
41
 
43
42
#include <stack>
44
43
#include <cctype>
51
50
using namespace peekabot;
52
51
//using namespace boost;
53
52
using namespace gui;
54
 
using peekabot::renderer::TheRenderer;
 
53
 
55
54
 
56
55
UserInterfaceUtilities::UserInterfaceUtilities() :
57
56
    m_fullscreen_viewport(0),
87
86
    // Second value of pair true if the object was not previously in the selection set
88
87
    if(m_selected_objects.insert(object).second)
89
88
    {
 
89
        post_action(new SetSelected(object, true));
 
90
 
90
91
        // Notify interested parties
91
92
        m_on_object_selected(object);
92
93
 
376
377
        int choice = fl_choice("Really delete the selected object?",
377
378
                               "Cancel", "Delete", 0);
378
379
        if(choice == 1)
379
 
            post_action(new RemoveObject(*m_selected_objects.begin()));
 
380
        {
 
381
            ObjectID id = *m_selected_objects.begin();
 
382
 
 
383
            deselect_object(id);
 
384
            post_action(new RemoveObject(id));
 
385
        }
380
386
    }
381
387
    else if(m_selected_objects.size() > 1)
382
388
        fl_message("Objects may only be deleted one at a time.");